package com.sugar.subscribe.course.module.business.service.coachwallet;

import java.util.*;
import javax.validation.*;
import com.sugar.subscribe.course.module.business.controller.admin.coachwallet.vo.*;
import com.sugar.subscribe.course.module.business.controller.app.coachwallet.vo.AppCoachProfitHistoryReqVO;
import com.sugar.subscribe.course.module.business.controller.app.coachwallet.vo.AppCoachProfitHistoryRespVO;
import com.sugar.subscribe.course.module.business.controller.app.coachwallet.vo.AppCoachProfitRespVO;
import com.sugar.subscribe.course.module.business.controller.app.coachwallet.vo.AppCoachWalletRespVO;
import com.sugar.subscribe.course.module.business.dal.dataobject.coachwallet.CoachWalletDO;
import com.sugar.subscribe.course.framework.common.pojo.PageResult;
import com.sugar.subscribe.course.framework.common.pojo.PageParam;

/**
 * 教练钱包 Service 接口
 *
 * @author Ysugar
 */
public interface CoachWalletService {

    /**
     * 更新用户余额信息
     * @param coachId 教练ID
     * @param add true增加 false扣除
     * @param amount 金额（单位分）
     */
    void updateCoachWallet(Long coachId, boolean add, Integer amount);

    /**
     * 删除教练钱包
     *
     * @param id 编号
     */
    void deleteCoachWallet(Long id);

    /**
    * 批量删除教练钱包
    *
    * @param ids 编号
    */
    void deleteCoachWalletListByIds(List<Long> ids);

    /**
     * 获得教练钱包
     *
     * @param id 编号
     * @return 教练钱包
     */
    CoachWalletDO getCoachWallet(Long id);

    /**
     * 获得教练钱包
     *
     * @param coachId 编号
     * @return 教练钱包
     */
    CoachWalletDO getWalletByCoachId(Long coachId);

    /**
     * 获得教练钱包分页
     *
     * @param pageReqVO 分页查询
     * @return 教练钱包分页
     */
    PageResult<CoachWalletDO> getCoachWalletPage(CoachWalletPageReqVO pageReqVO);

    AppCoachWalletRespVO appGetCoachWallet(Long coachId);

    AppCoachProfitRespVO getCoachProfit(Long coachId, Integer type);

    PageResult<AppCoachProfitHistoryRespVO> getCoachProfitHistoryPage(Long coachId, @Valid AppCoachProfitHistoryReqVO reqVO);
}